package com.ms;
import com.alibaba.fastjson.JSON;
import com.ms.exmaple.orm.config.ApplicationConfig;
import com.ms.exmaple.orm.entity.User;
import com.ms.exmaple.orm.service.UserService;
import com.ms.orm.meta.IPage;
import com.ms.orm.meta.Page;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;


/**
 * Hello world!
 */
public class Mapper_App6 {
    public static void main(String[] args) {
        try {
            ApplicationContext app = new AnnotationConfigApplicationContext(ApplicationConfig.class);
            UserService userService = (UserService) app.getBean("userService");

            IPage<User> page = userService.selectUsersWithConditionPage(new Page<>(1,10),null,null);
            System.err.println("selectUsersWithConditionPage=="+JSON.toJSONString(page));
        }catch (Exception e) {
            e.printStackTrace();
        }
    }
}
